<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>ColumNav example: content loaded from a JSON object via Ajax</title>
    <script type="text/javascript" src="../js/yui/yahoo.js"></script>
    <script type="text/javascript" src="../js/yui/event.js"></script>
    <script type="text/javascript" src="../js/yui/container_core.js"></script>
    <script type="text/javascript" src="../js/yui/dom.js"></script>
    <script type="text/javascript" src="../js/yui/animation.js"></script>
    <script type="text/javascript" src="../js/yui/connection.js"></script>
    <script type="text/javascript" src="../js/carousel.js"></script>
    <script type="text/javascript" src="../js/json.js"></script>
    <script type="text/javascript" src="../js/columnav.js"></script>
    <link href="../css/carousel.css" rel="stylesheet" type="text/css"/>
    <link href="../css/columnav.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">
      try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
      function init() {
          var cn_cfg = { prevElement: 'columnav-prev', source: 'ajax/json/basketball.json' };
          var cn = new YAHOO.extension.ColumNav('columnav', cn_cfg);

          var sv1_cfg = { url: location.href, modifier: 'HTML' };
          var sv1 = new YAHOO.extension.SourceViewer('html-source', sv1_cfg);

          var sv2_cfg = { url: 'ajax/json/basketball.json', modifier: 'JSON' };
          var sv2 = new YAHOO.extension.SourceViewer('json-source', sv2_cfg);
      }
      YAHOO.util.Event.addListener(window, 'load', init);
    </script>
    <script type="text/javascript" src="../js/viewsource.js"></script>
    <link href="../css/stringify.css" rel="stylesheet" type="text/css"/>
  </head>
  <body>
    <div id="main">
      <div id="content">
        <p style="float:right"><a href="../">Documentation</a></p>
        <h1>ColumNav</h1>
        <h2>Example</h2>
        <div class="prevButton">
          <a href="javascript:void(0)" id="columnav-prev">&lt; back</a>
        </div>
        <div id="columnav" class="carousel-component">
          <div class="carousel-clip-region">
            <ul class="carousel-list"></ul>
          </div>
        </div>
        <div class="viewsource" id="html-source"></div>
        <div class="viewsource" id="json-source"></div>
        <p>The ColumNav above is initialized from the content residing at <a href="./ajax/json/basketball.json"><code>./ajax/json/basketball.json</code></a>. The data source does not need to be a JSON file, only a resource that returns JSON content in the expected format. The resource must be served with the mime type <code>application/json</code>. You must also include the <a href="http://www.json.org/json.js">JSON parsing script</a>.</p>
      </div>
    </div>
  </body>
</html>
